package com.fingard.csp.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/simulate")

public class SimulateRuleClientController {
    @Autowired
    public SimulateService simulateService;
    /*@Autowired
    RestTemplate restTemplate;

    @GetMapping(value = "/info")
    public String queryOrderInfo(){
        String tmpInfo = restTemplate.getForObject("http://csp-service-server/csp/simulate/rule/findAll",String.class);
        return "restTemplate访问csp-service-server服务提供者返回的信息:"+tmpInfo;
    }*/
    @GetMapping(value = "/info")
    public String queryOrderInfo(){
        String tmpInfo = simulateService.microService01FeignTest();
        return "restTemplate访问csp-service-server服务提供者返回的信息:"+tmpInfo;
    }
}